-
Notifications
You must be signed in to change notification settings - Fork 16
Integration guide and quickstarts #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some notes to self to improve this if I find the time.
|
||
- `--vm-build-tier` - The tier to use when building the template. You can improve build time, especially with custom Docker configurations. This will not influence the `vm-tier` | ||
- `--vm-tier` - The default minimum tier to give Sandboxes created from the template. Note that you can set a higher tier when creating the Sandbox, but not lower | ||
- `--privacy` - By default the Sandbox is `unlisted`, meaning that its hosts are public, but the Sandbox is not discoverable without knowing the `id`. We recommend setting this to `private`, though this will require you to generate host tokens to access the hosts on the Sandbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --privacy
command doesn't seem to exist.
This configures an iframe to show the preview. The power of this API is that you can interact with the iframe. Due to domain restrictions you will need to trust your development and application hosts using the CLI: | ||
|
||
```sh | ||
npx @codesandbox/sdk preview-hosts preview-hosts add my-domain.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npx @codesandbox/sdk preview-hosts preview-hosts add my-domain.io | |
npx @codesandbox/sdk preview-hosts add my-domain.io |
You build the template with: | ||
|
||
```bash | ||
CSB_API_KEY=my-key npx @codesandbox/sdk build ./my-template-folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can consider adding the use of the csb
command instead of npx @codesandbox/sdk
or show both. Maybe also consider adding export CSB_API_KEY=key
to the document.
}) | ||
``` | ||
|
||
Read more at http://localhost:3000/sdk/browser-previews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix link
No description provided.